package com.cskaoyan.service;

import com.cskaoyan.bean.User;
import org.springframework.stereotype.Service;
import sun.awt.windows.ThemeReader;

/**
 * @author stone
 * @date 2022/05/26 11:33
 */
@Service
public class UserServiceImpl implements UserService{
    @Override
    public void sayHello(String name) {
        System.out.println("hello " + name);

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    //execution(public com.cskaoyan.bean.User com.cskaoyan.service.UserServiceImpl.sayHello())
    //任意类型的返回值
    //execution(public * com.cskaoyan.service.UserServiceImpl.sayHello())
    //execution(public com.cskaoyan.bean.* com.cskaoyan.service.UserServiceImpl.sayHello())
    //execution(public com.cskaoyan.bean.User* com.cskaoyan.service.UserServiceImpl.sayHello())


    //execution(public * com.cskaoyan.service.UserServiceImpl.sayHello())
    //com.cskaoyan包下的所有的UserServiceImpl类中的sayHello()方法
    //execution(public * com.cskaoyan..UserServiceImpl.sayHello())
    //com.cskaoyan.service包下的所有的sayHello()方法
    //execution(public * com.cskaoyan.service..sayHello())

    //service层的所有的实现类里的任意方法名的方法
    //execution(public * com.cskaoyan.service.*Impl.*())

    //需要增强service层的任意方法名的方法，包含两个参数的方法
    //execution(* com.cskaoyan.service..*(*,*))

    //需要增强service层的任意方法名的方法，任意参数
    //execution(* com.cskaoyan.service..*(..))


    @Override
    public User sayHello() {
        return null;
    }

    //execution(public com.cskaoyan.bean.User com.cskaoyan.service.UserServiceImpl.sayHello(com.cskaoyan.bean.User))
    @Override
    public User sayHello(User user) {
        return null;
    }

}
